import Vue from "vue";
import VueRouter from "vue-router";

import Home from "@/views/Home.vue";

Vue.use(VueRouter);

const router = new VueRouter({
  routes: [
    {
      path: "/home",
      // component: Home,
      components: {
        // key: value
        //    key 坑名
        //    value 对应的组件
        top: Home,
        bottom: {
          // render: (h) => h("div", null, "bottom组件"),
          template: `
            <div>bottom组件</div>
          `,
        },
        default: {
          render: (h) => h("div", null, "default组件"),
        },
      },
    },
  ],
});

export default router;
